﻿<!DOCTYPE html>
<html>
<!-- 我的培训 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="11">
                    <p class="main-label">{{Mytraining.name+mark.m}}</p>
                    <p class="lh35">{{Form.mark03}}</p>
                </el-col>
                <el-col :span="11">
                    <p class="main-label">{{Mytraining.trainingcourse+mark.m}}</p>
                    <p class="lh35">{{Form.mark01}}</p>
                </el-col>
                
                <el-col :span="11">
                    <p class="main-label">{{Mytraining.Trainer+mark.m}}</p>
                    <p class="lh35">{{Form.mark02}}</p>
                </el-col>
                <br>
                <br>
                <br>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item prop="experience">
                            <div class="el-input--mini el-input-group">
                                <div class="el-input-group__prepend">
                                    {{Mytraining.LearningExperience+mark.m}}
                                </div>
                                <el-input class="el-textarea__inner" type="textarea" v-model="Form.experience"
                                    autocomplete="off"></el-input>
                                <span class="iputLineMust" v-if="!Form.experience">
                                    <!-- 必填项添加 -->
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </div>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item prop="content">
                            <div class="el-input--mini el-input-group">
                                <div class="el-input-group__prepend">
                                    {{Mytraining.SummaryofContent+mark.m}}
                                </div>
                                <el-input class="el-textarea__inner" type="textarea" v-model="Form.content"
                                    autocomplete="off"></el-input>
                                <span class="iputLineMust" v-if="!Form.content">
                                    <!-- 必填项添加 -->
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </div>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item prop="advice">
                            <div class="el-input--mini el-input-group">
                                <div class="el-input-group__prepend">
                                    {{Mytraining.SuggestionsforWork+mark.m}}
                                </div>
                                <el-input class="el-textarea__inner" type="textarea" v-model="Form.advice"
                                    autocomplete="off"></el-input>
                                <span class="iputLineMust" v-if="!Form.advice">
                                    <!-- 必填项添加 -->
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </div>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: '',
                // picked : '1',
                //父业传参
                id: '',
                //获取下拉菜单frequency
                frequency: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    SummaryofContent: '',
                    LearningExperience: '',
                    SuggestionsforWork: '',


                },
                //表单验证
                rules: {
                    content: [
                        verification.NotNull,
                    ],
                    experience: [
                        verification.NotNull,
                    ],
                    advice: [
                        verification.NotNull,
                    ],


                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/PX_PlanUser/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/PX_PlanUser/get?id=' + this.id);
                    
                },
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                
                //初始化数据
                // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
        });
    </script>
</body>

</html>